package com.zhanbo.zhanbowymusic.main.featured.adapter;

import android.content.Context;
import android.text.TextUtils;

import com.mwx.baselib.base.BaseBindingAdapter;
import com.mwx.baselib.bean.TagPlayListBean;
import com.mwx.baselib.utils.GlideUtils;
import com.zhanbo.zhanbowymusic.R;
import com.zhanbo.zhanbowymusic.databinding.ItemPCListBinding;

public class PCZoneListAdapter extends BaseBindingAdapter<TagPlayListBean, ItemPCListBinding> {
    public PCZoneListAdapter(Context context) {
        super(context);
    }

    @Override
    protected int getLayoutResId(int viewType) {
        return R.layout.item_p_c_list;
    }

    @Override
    protected void onBindItem(ItemPCListBinding binding, TagPlayListBean item) {
        if(item.getSong()!=null){
            binding.tvName.setText(TextUtils.isEmpty(item.getSong().getName())?"":item.getSong().getName());
            GlideUtils.loadImageRounded10(context,item.getSong().getCoverImg(),binding.tvHead);
        }
    }
}
